package org.testing;

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.easypeas.annotations.Action;
import org.easypeas.annotations.EasyPea;
import org.easypeas.annotations.View;

/**
 *
 * @author S Owen
 */
@EasyPea(name="circle")
public class Circle {
    
   @View(name="name", template="/shape/name.vm")
   public void getName(HttpServletRequest request, HttpServletResponse resp, Map<String,Object> map) {
       map.put("name","circle");
   }
    
   @View(name="test", template="/shape/test.vm")
   public void test(HttpServletRequest request, HttpServletResponse resp, Map<String,Object> map) {
       map.put("name","circle");
   }
   
   @Action(name="testaction",forwards="success=/shape/testactionresult.vm")
   public String testAction(HttpServletRequest request, HttpServletResponse resp, Map<String,Object> map) {
       map.put("result",request.getParameter("sometext"));
       return "success";
   }
   
}
